package com.szl.group.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.szl.group.common.anno.Retryable;
import com.szl.group.entity.SysMenuDO;
import com.szl.group.mapper.SysMenuMapper;
import com.szl.group.service.AbstractService;
import com.szl.group.service.ISysMenuService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 系统菜单表 服务实现类
 * </p>
 *
 * @author shenxl
 * @since 2020-06-21
 */
@Service
public class SysMenuServiceImpl extends AbstractService<SysMenuMapper, SysMenuDO> implements ISysMenuService {


    @Override
    @Retryable(value = Exception.class,maxAttempts = 4,intervalTimes = 3000)
    public void test(){
        System.out.println("测试重试方法");
        int i=1/0;
    }

    @Override
    public IPage<SysMenuDO> selectByPage(Page<SysMenuDO> page) {
        return baseMapper.selectPage(page, new QueryWrapper<>());
    }
}
